package cn.itcast.bos.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.itcast.bos.dao.StandardRepostitory;
import cn.itcast.bos.domain.base.Standard;
import cn.itcast.bos.service.StandardService;

@Service
@Transactional
public class StandardServiceImpl implements StandardService{

	@Autowired
	private StandardRepostitory standardRepository;
	
	@Override
	public void save(Standard standard) {
		standardRepository.save(standard);
	}

	@Override
	public Page<Standard> pageQuery(Pageable pageable) {
		
		return standardRepository.findAll(pageable);
	}

	@Override
	public void delete(Integer id) {
		standardRepository.delete(id);
	}

	@Override
	public List<Standard> findAll() {
		return standardRepository.findAll();
	}


}
